
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreCouponUserRequest struct {

	Cid string `json:"cid" form:"cid"`

	Uid string `json:"uid" form:"uid"`

	CouponTitle string `json:"coupon_title" form:"coupon_title"`

	CouponPrice string `json:"coupon_price" form:"coupon_price"`

	UseMinPrice string `json:"use_min_price" form:"use_min_price"`

	AddTime string `json:"add_time" form:"add_time"`

	StartTime string `json:"start_time" form:"start_time"`

	EndTime string `json:"end_time" form:"end_time"`

	UseTime string `json:"use_time" form:"use_time"`

	Type string `json:"type" form:"type"`

	Status string `json:"status" form:"status"`

	IsFail string `json:"is_fail" form:"is_fail"`

}

func (r *StoreCouponUserRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreCouponUserRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"cid": "required",

		"uid": "required",

		"coupon_title": "required",

		"coupon_price": "required",

		"use_min_price": "required",

		"add_time": "required",

		"start_time": "required",

		"end_time": "required",

		"use_time": "required",

		"type": "required",

		"status": "required",

		"is_fail": "required",

	}
}

func (r *StoreCouponUserRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreCouponUserRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreCouponUserRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
